<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('操作日志详细')" />
    <th:block th:include="include :: jsonview-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m-t" id="signupForm">
        <div class="form-group">
            <label class="col-sm-2 control-label">系统模块：</label>
            <div class="form-control-static" th:text="${operLog.logModule}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">登录信息：</label>
            <div class="form-control-static" th:text="${operLog.execUserId}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">请求地址：</label>
            <div class="form-control-static" th:text="${operLog.execUrl}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">请求方式：</label>
            <div class="form-control-static" th:text="'Post'" th:style="'display:' + ${operLog.execType == 1 ? 'block' : 'none'}">
            </div>
            <div class="form-control-static" th:text="'Get'" th:style="'display:' + ${operLog.execType == 2 ? 'block' : 'none'}">
            </div>
            <div class="form-control-static" th:text="'Put'" th:style="'display:' + ${operLog.execType == 3 ? 'block' : 'none'}">

            </div>
            <div class="form-control-static" th:text="'Delete'" th:style="'display:' + ${operLog.execType == 4 ? 'block' : 'none'}">
            </div>
            <div class="form-control-static" th:text="'Request'" th:style="'display:' + ${operLog.execType == 0 ? 'block' : 'none'}">
            </div>
            <div class="form-control-static" th:text="'其他'" th:style="'display:' + ${operLog.execType == -1 ? 'block' : 'none'}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">操作耗时：</label>
            <div class="form-control-static" th:text="${operLog.execCost}+'ms'">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">请求参数：</label>
            <div class="form-control-static"><pre id="operParam"></pre></div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">返回参数：</label>
            <div class="form-control-static"><pre id="jsonResult"></pre></div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">状态：</label>
            <div class="form-control-static" th:class="${operLog.execStatus == 0 ? 'label label-primary' : 'label label-danger'}" th:text="${operLog.execStatus == 0 ? '正常' : '异常'}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">日志时间：</label>
            <div class="form-control-static" th:text="${operLog.logTime}">
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: jsonview-js" />
<script th:inline="javascript">
    $(function() {
        var operParam = [[${operLog.execParam}]];
        if ($.common.isNotEmpty(operParam) && operParam.length < 2000) {
            $("#operParam").JSONView(operParam);
        } else {
            $("#operParam").text(operParam);
        }
        var jsonResult = [[${operLog.execResult}]];
        var st = [[${operLog.execStatus}]]
        if ($.common.isNotEmpty(jsonResult) && jsonResult.length < 2000 && st==0) {
            $("#jsonResult").JSONView(jsonResult);
        } else {
            $("#jsonResult").text(jsonResult);
        }
    });
</script>
</body>
</html>